package com.example.myblog.service;

import com.example.myblog.NotFoundException;
import com.example.myblog.dao.UserDao;
import com.example.myblog.entity.User;


import com.example.myblog.util.MD5Utils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.jws.soap.SOAPBinding;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by asus on 2020/5/28 13:47
 */
@Service
public class UserService{
    @Autowired private UserDao userDao;


    public User checkUser(String username, String password){
        User user = userDao.findByUsernameAndPassword(username, MD5Utils.code(password));
        return user;
    }

}
